package movEat.Kernel.ThreadManaging;

import java.util.concurrent.ExecutorService;

public class ThreadManaging {
	private static ExecutorService executor = null;
	
	public static void init(int NumOfThreads){
		if (executor == null)
			executor = java.util.concurrent.Executors.newFixedThreadPool(NumOfThreads);
	}
	
	public static void Execute(Runnable command){
		executor.execute(command);
	}

	public static void ShutDown() {
		executor.shutdown();
		
	}
	
}
